import * as BabelCore from '@babel/core'
import * as types from '@babel/types'

export const compiler = (babel: typeof BabelCore) => {
  const { template } = babel
  const tryCatchBuild = template(`
        try {
            SOURCE
        } catch(e) {
            console.log(e)
        }
    `)

  return tryCatchBuild
}
